<!DOCTYPE form-validation PUBLIC
     "-//Apache Software Foundation//DTD Commons Validator Rules Configuration 1.3.0//EN"
     "D:/p/ws3/gp-web/src/main/webapp/dtds/validator_1_1.dtd">
<!--
D:/p/ws3/gp-web/src/main/webapp/dtds
http://jakarta.apache.org/commons/dtds
 -->
<form-validation>
	<formset>
<#list m.classes as c>
		<#assign fieldFlag = 0>
		<#list c.properties as p>
			<#if p.element.depends?length != 0>
			<#if fieldFlag == 0>
		<form name="${c.name?uncap_first}Form">
				<#assign fieldFlag = 1>
			</#if>
			<field property="${p.name}" depends="${p.element.depends}">
				<arg key="${c.name?uncap_first}.${p.name}" position="0" />
			<#if p.element.dateFormat??>
				<var>
					<var-name>datePattern</var-name>
					<var-value>${p.element.dateFormat}</var-value>
				</var>
			</#if>
			<#if p.element.minlength??>
				<arg key="${"$"}{var:minlength}" resource="false" position="1" />
				<var>
					<var-name>minlength</var-name>
					<var-value>${p.element.minlength}</var-value>
				</var>
			</#if>
			<#if p.element.maxlength??>
				<arg key="${"$"}{var:maxlength}" resource="false" position="2" />
				<var>
					<var-name>maxlength</var-name>
					<var-value>${p.element.maxlength}</var-value>
				</var>
			</#if>
			<#if p.element.precision??>
				<arg key="${"$"}{var:precision}" resource="false" position="3" />
				<arg key="${"$"}{var:scale}" resource="false" position="4" />
				<var>
					<var-name>precision</var-name>
					<var-value>${p.element.precision}</var-value>
				</var>
				<var>
					<var-name>scale</var-name>
					<var-value>${p.element.scale}</var-value>
				</var>
			</#if>
			<#if p.element.range??>
				<arg key="${"$"}{var:min}" resource="false" position="5" />
				<arg key="${"$"}{var:max}" resource="false" position="6" />
				<var>
					<var-name>min</var-name>
					<var-value>${p.element.rangelow}</var-value>
				</var>
				<var>
					<var-name>max</var-name>
					<var-value>${p.element.rangehigh}</var-value>
				</var>
			</#if>
			</field>
			</#if>
		</#list>
		<#if fieldFlag == 1>
		</form>
		</#if>
</#list>
	</formset>
</form-validation>
